package caizw.hibernate.base.dao;

import java.util.List;

/**
 * @author caizw
 */
public class PageInfo<T> {
    private long pageRow;
    private long pageSize;
    private long totalPage = 0;
    private long total = 0;
    private List<T> list;

    public PageInfo(){

    }

    public long getPageRow() {
        return pageRow;
    }

    public void setPageRow(long pageRow) {
        this.pageRow = pageRow;
    }

    public long getPageSize() {
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        this.pageSize = pageSize;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public long getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(long totalPage) {
        this.totalPage = totalPage;
    }

    public PageInfo(long pageRow, long pageSize,  List<T> list) {
        this.pageRow = pageRow;
        this.pageSize = pageSize;
        this.list = list;
    }

    @Override
    public String toString() {
        return "PageInfo{" +
                "pageRow=" + pageRow +
                ", pageSize=" + pageSize +
                ", totalPage=" + totalPage +
                ", total=" + total +
                ", list=" + list +
                '}';
    }
}
